package com.xunyin.modules.mtusergrade.service.mapper;


import com.xunyin.common.mapper.CoreMapper;
import com.xunyin.modules.mtusergrade.domain.MtUserGrade;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 *  Mapper 接口
 *
 * Created by xunyinyunshang <3594419785@qq.com>
 * CopyRight 讯音云商 https://www.tonetn.com
 */
@Repository
public interface MtUserGradeMapper extends CoreMapper<MtUserGrade> {

    @Select("<script> " +
            " select a.* from mt_user_grade a "+
            " left join yx_user b on a.id = b.grade_id " +
            " where a.status = 'A' and b.uid = #{userId} " +
            "</script>")
    MtUserGrade findUserGradeByUserId(@Param("userId") Integer userId);

}
